home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / athena / zephyr / dist / patch3 < prev    next >
Encoding:
Text File  |  1989-12-17  |  37.3 KB  |  1,277 lines

  1. This is patch #3 to the Zephyr sources.
  2.  
  3. After applying the patch, rebuild the server, zctl, znol, zpopnotify,
  4. zmailnotify and zhm.
  5.  
  6. BE SURE TO APPLY THIS PATCH WITH
  7.  
  8.    patch -p
  9.  
  10. TO PRESERVE THE DIRECTORY HIERARCHY.
  11.  
  12. CHANGES in this patch file:
  13.     - remove support for zinit (it is now part of the separate
  14.         Athena program "attach")
  15.     - fix unsubscriptions in zctl
  16.     - turn off ATHENA_COMPAT for zmailnotify
  17.     - add support for "-f -" for znol
  18.     - fix bug in zpopnotify which sent all notices to the same
  19.         recipient
  20.     - bug fixes for acl_files.c in library
  21.     - clean up installation step of server so it only removes old
  22.         .acl files 
  23.     - make server truly case-insensitive
  24.     - put some fake message logging in server, improve other error messages
  25.     - fix bad xfree() call in server
  26.     - parameterize pid file name for zhm
  27.     - update affected manual pages
  28.  
  29. Prereq: 2
  30. diff -rc patchlevel2/patchlevel.h src/patchlevel.h
  31. *** patchlevel2/patchlevel.h    Fri Oct 27 13:29:25 1989
  32. --- src/patchlevel.h    Mon Dec 18 13:52:21 1989
  33. ***************
  34. *** 1 ****
  35. ! #define PATCHLEVEL 2
  36. --- 1 ----
  37. ! #define PATCHLEVEL 3
  38. diff -rc patchlevel2/clients/Imakefile src/clients/Imakefile
  39. *** patchlevel2/clients/Imakefile    Wed Apr  5 16:57:11 1989
  40. --- src/clients/Imakefile    Mon Oct 30 16:53:56 1989
  41. ***************
  42. *** 3,11 ****
  43.   /**/#    For copying and distribution information, see the file
  44.   /**/#    "mit-copyright.h". 
  45.   /**/#
  46. ! /**/#    $Source: /mit/zephyr/src/clients/RCS/Imakefile,v $
  47.   /**/#    $Author: jtkohl $
  48. ! /**/#    $Header: Imakefile,v 1.5 89/04/05 16:56:59 jtkohl Exp $
  49.   /**/#
  50.   #define have_subdirs
  51.   #define no_curdir_lint
  52. --- 3,11 ----
  53.   /**/#    For copying and distribution information, see the file
  54.   /**/#    "mit-copyright.h". 
  55.   /**/#
  56. ! /**/#    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/RCS/Imakefile,v $
  57.   /**/#    $Author: jtkohl $
  58. ! /**/#    $Header: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/RCS/Imakefile,v 1.6 89/10/30 16:53:53 jtkohl Exp $
  59.   /**/#
  60.   #define have_subdirs
  61.   #define no_curdir_lint
  62. ***************
  63. *** 27,33 ****
  64.   ZMAILNOTIFY=
  65.   #endif /* HESIOD && KERBEROS */
  66.   
  67. ! SUBDIRS = zaway zctl zinit zleave zlocate \
  68.       $(ZMAILNOTIFY) znol zpopnotify zshutdown_notify zstat zwrite $(SYSLOGD)
  69.   
  70.   #ifdef OLD_ATHENA_COMPAT
  71. --- 27,33 ----
  72.   ZMAILNOTIFY=
  73.   #endif /* HESIOD && KERBEROS */
  74.   
  75. ! SUBDIRS = zaway zctl zleave zlocate \
  76.       $(ZMAILNOTIFY) znol zpopnotify zshutdown_notify zstat zwrite $(SYSLOGD)
  77.   
  78.   #ifdef OLD_ATHENA_COMPAT
  79. diff -rc patchlevel2/clients/zctl/zctl.c src/clients/zctl/zctl.c
  80. *** patchlevel2/clients/zctl/zctl.c    Thu Mar 23 17:04:18 1989
  81. --- src/clients/zctl/zctl.c    Wed Nov 15 12:01:00 1989
  82. ***************
  83. *** 3,9 ****
  84.    *
  85.    *    Created by:    Robert French
  86.    *
  87. !  *    $Source: /mit/zephyr/src/clients/zctl/RCS/zctl.c,v $
  88.    *    $Author: jtkohl $
  89.    *
  90.    *    Copyright (c) 1987,1988 by the Massachusetts Institute of Technology.
  91. --- 3,9 ----
  92.    *
  93.    *    Created by:    Robert French
  94.    *
  95. !  *    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/zctl/RCS/zctl.c,v $
  96.    *    $Author: jtkohl $
  97.    *
  98.    *    Copyright (c) 1987,1988 by the Massachusetts Institute of Technology.
  99. ***************
  100. *** 21,27 ****
  101.   #include <sys/file.h>
  102.   #include <sys/param.h>
  103.   #ifndef lint
  104. ! static char rcsid_zctl_c[] = "$Header: zctl.c,v 1.13 89/03/23 17:03:56 jtkohl Exp $";
  105.   #endif lint
  106.   
  107.   #define SUBSATONCE 7
  108. --- 21,27 ----
  109.   #include <sys/file.h>
  110.   #include <sys/param.h>
  111.   #ifndef lint
  112. ! static char rcsid_zctl_c[] = "$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/zctl/RCS/zctl.c,v 1.14 89/11/15 12:00:51 jtkohl Exp $";
  113.   #endif lint
  114.   
  115.   #define SUBSATONCE 7
  116. ***************
  117. *** 119,125 ****
  118.           exit((code != 0));
  119.       } 
  120.   
  121. !     printf("ZCTL $Revision: 1.13 $ (Protocol %s%d.%d) - Type '?' for a list of commands.\n\n",
  122.              ZVERSIONHDR,
  123.              ZVERSIONMAJOR,ZVERSIONMINOR);
  124.       
  125. --- 119,125 ----
  126.           exit((code != 0));
  127.       } 
  128.   
  129. !     printf("ZCTL $Revision: 1.14 $ (Protocol %s%d.%d) - Type '?' for a list of commands.\n\n",
  130.              ZVERSIONHDR,
  131.              ZVERSIONMAJOR,ZVERSIONMINOR);
  132.       
  133. ***************
  134. *** 703,710 ****
  135.               if (type == UNSUB)
  136.                   continue;
  137.               unsubs[unind].class =
  138. !                 malloc((unsigned)(strlen(subline)+1));
  139. !             (void) strcpy(unsubs[unind].class,subline);
  140.               unsubs[unind].classinst =
  141.                   malloc((unsigned)(strlen(comma+1)+1));
  142.               (void) strcpy(unsubs[unind].classinst,comma+1);
  143. --- 703,711 ----
  144.               if (type == UNSUB)
  145.                   continue;
  146.               unsubs[unind].class =
  147. !                 malloc((unsigned)(strlen(subline)));
  148. !             /* skip the leading '!' */
  149. !             (void) strcpy(unsubs[unind].class,subline+1);
  150.               unsubs[unind].classinst =
  151.                   malloc((unsigned)(strlen(comma+1)+1));
  152.               (void) strcpy(unsubs[unind].classinst,comma+1);
  153. diff -rc patchlevel2/clients/zmailnotify/Imakefile src/clients/zmailnotify/Imakefile
  154. *** patchlevel2/clients/zmailnotify/Imakefile    Thu Mar 23 11:18:43 1989
  155. --- src/clients/zmailnotify/Imakefile    Wed Nov 15 10:31:41 1989
  156. ***************
  157. *** 3,16 ****
  158.   /**/#    For copying and distribution information, see the file
  159.   /**/#    "mit-copyright.h". 
  160.   /**/#
  161. ! /**/#    $Source: /mit/zephyr/src/clients/zmailnotify/RCS/Imakefile,v $
  162.   /**/#    $Author: jtkohl $
  163. ! /**/#    $Header: Imakefile,v 1.2 89/03/23 11:18:38 jtkohl Exp $
  164.   /**/#
  165.   
  166.   LIBS= ${ZEPHYR_LIB} ${COMERR_LIB} ${KRB_LIB} ${DES_LIB} ${HES_LIB}
  167.   LINTLIBS= ${ZEPHYR_LINTLIB} ${COMERR_LINTLIB} ${KRB_LINTLIB} ${DES_LINTLIB}
  168. ! DEFINES= -DKPOP -DATHENA_COMPAT
  169.   
  170.   SRCS = zmailnotify.c
  171.   OBJS = zmailnotify.o
  172. --- 3,16 ----
  173.   /**/#    For copying and distribution information, see the file
  174.   /**/#    "mit-copyright.h". 
  175.   /**/#
  176. ! /**/#    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/zmailnotify/RCS/Imakefile,v $
  177.   /**/#    $Author: jtkohl $
  178. ! /**/#    $Id: Imakefile,v 1.3 89/11/15 10:31:28 jtkohl Exp $
  179.   /**/#
  180.   
  181.   LIBS= ${ZEPHYR_LIB} ${COMERR_LIB} ${KRB_LIB} ${DES_LIB} ${HES_LIB}
  182.   LINTLIBS= ${ZEPHYR_LINTLIB} ${COMERR_LINTLIB} ${KRB_LINTLIB} ${DES_LINTLIB}
  183. ! DEFINES= -DKPOP
  184.   
  185.   SRCS = zmailnotify.c
  186.   OBJS = zmailnotify.o
  187. diff -rc patchlevel2/clients/znol/znol.c src/clients/znol/znol.c
  188. *** patchlevel2/clients/znol/znol.c    Fri Oct 27 13:29:27 1989
  189. --- src/clients/znol/znol.c    Mon Oct 30 09:47:30 1989
  190. ***************
  191. *** 19,25 ****
  192.   #include <string.h>
  193.   
  194.   #ifndef lint
  195. ! static char rcsid_znol_c[] = "$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/znol/RCS/znol.c,v 1.6 89/10/25 14:17:51 jtkohl Exp $";
  196.   #endif lint
  197.   
  198.   #define SUBSATONCE 7
  199. --- 19,25 ----
  200.   #include <string.h>
  201.   
  202.   #ifndef lint
  203. ! static char rcsid_znol_c[] = "$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/znol/RCS/znol.c,v 1.7 89/10/30 09:47:10 jtkohl Exp $";
  204.   #endif lint
  205.   
  206.   #define SUBSATONCE 7
  207. ***************
  208. *** 47,65 ****
  209.           exit (1);
  210.       }
  211.   
  212. -     envptr = getenv("HOME");
  213. -     if (envptr)
  214. -         (void) strcpy(anyonename,envptr);
  215. -     else {
  216. -         if (!(pwd = getpwuid((int) getuid()))) {
  217. -             fprintf(stderr,"Who are you?\n");
  218. -             exit (1);
  219. -         }
  220. -         (void) strcpy(anyonename,pwd->pw_dir);
  221. -     } 
  222. -     (void) strcat(anyonename,"/.anyone");
  223.       for (arg=1;arg<argc;arg++) {
  224.           if (!strcmp(argv[arg],"on")) {
  225.               onoff = ON;
  226. --- 47,52 ----
  227. ***************
  228. *** 114,123 ****
  229.               exit(1);
  230.           }
  231.       
  232.   
  233. !     if (!useronly && !(fp = fopen(anyonename,"r"))) {
  234. !         fprintf(stderr,"Can't open %s for input\n",anyonename);
  235. !         exit (1);
  236.       }
  237.   
  238.       ind = 0;
  239. --- 101,129 ----
  240.               exit(1);
  241.           }
  242.       
  243. +     if (!useronly) {
  244. +         /* If no filename specified, get the default */
  245. +         if (!filenamed) {
  246. +             envptr = getenv("HOME");
  247. +             if (envptr)
  248. +                 (void) strcpy(anyonename,envptr);
  249. +             else {
  250. +                 if (!(pwd = getpwuid((int) getuid()))) {
  251. +                     fprintf(stderr,"You are not listed in the password file.\n");
  252. +                     exit (1);
  253. +                 }
  254. +                 (void) strcpy(anyonename,pwd->pw_dir);
  255. +             }
  256. +             (void) strcat(anyonename,"/.anyone");
  257. +         }
  258.   
  259. !         /* if the filename is "-", read stdin */
  260. !         if (strcmp(anyonename,"-") == 0) {
  261. !             fp = stdin;
  262. !         } else if (!(fp = fopen(anyonename,"r"))) {
  263. !             fprintf(stderr,"Can't open %s for input\n",anyonename);
  264. !             exit (1);
  265. !         }
  266.       }
  267.   
  268.       ind = 0;
  269. *** patchlevel2/clients/zpopnotify/zpopnotify.c    Wed May 10 16:54:01 1989
  270. --- src/clients/zpopnotify/zpopnotify.c    Wed Nov  8 15:42:24 1989
  271. ***************
  272. *** 3,9 ****
  273.    *
  274.    *    Created by:    Robert French
  275.    *
  276. !  *    $Source: /mit/zephyr/src/clients/zpopnotify/RCS/zpopnotify.c,v $
  277.    *    $Author: jtkohl $
  278.    *
  279.    *    Copyright (c) 1987,1988 by the Massachusetts Institute of Technology.
  280. --- 3,9 ----
  281.    *
  282.    *    Created by:    Robert French
  283.    *
  284. !  *    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/zpopnotify/RCS/zpopnotify.c,v $
  285.    *    $Author: jtkohl $
  286.    *
  287.    *    Copyright (c) 1987,1988 by the Massachusetts Institute of Technology.
  288. ***************
  289. *** 19,25 ****
  290.   #include <sys/param.h>            /* for MAXHOSTNAMELEN */
  291.   
  292.   #ifndef lint
  293. ! static char rcsid_zpopnotify_c[] = "$Header: zpopnotify.c,v 1.5 89/05/10 16:53:48 jtkohl Exp $";
  294.   #endif lint
  295.   
  296.   #define MAIL_CLASS "MAIL"
  297. --- 19,25 ----
  298.   #include <sys/param.h>            /* for MAXHOSTNAMELEN */
  299.   
  300.   #ifndef lint
  301. ! static char rcsid_zpopnotify_c[] = "$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/clients/zpopnotify/RCS/zpopnotify.c,v 1.6 89/11/08 15:42:11 jtkohl Exp $";
  302.   #endif lint
  303.   
  304.   #define MAIL_CLASS "MAIL"
  305. ***************
  306. *** 78,85 ****
  307.           notice.z_opcode = "";
  308.           notice.z_sender = mysender;
  309.           notice.z_default_format = "From Post Office $1:\n$2";
  310. !     
  311. !         notice.z_recipient = (char *)rindex(argv[1],'/');
  312.           if (notice.z_recipient)
  313.           notice.z_recipient++;
  314.           else
  315. --- 78,86 ----
  316.           notice.z_opcode = "";
  317.           notice.z_sender = mysender;
  318.           notice.z_default_format = "From Post Office $1:\n$2";
  319. !         /* in case it's a mailbox name (pathname), strip to username */
  320. !         notice.z_recipient = (char *)rindex(argv[i],'/');
  321.           if (notice.z_recipient)
  322.           notice.z_recipient++;
  323.           else
  324. diff -rc patchlevel2/lib/acl_files.c src/lib/acl_files.c
  325. *** patchlevel2/lib/acl_files.c    Thu Mar 23 09:32:53 1989
  326. --- src/lib/acl_files.c    Wed Dec 13 11:19:41 1989
  327. ***************
  328. *** 3,9 ****
  329.    *
  330.    *    Created by:    John T. Kohl
  331.    *
  332. !  *    $Source: /mit/zephyr/src/lib/RCS/acl_files.c,v $
  333.    *    $Author: jtkohl $
  334.    *
  335.    *    Copyright (c) 1987,1988 by the Massachusetts Institute of Technology.
  336. --- 3,9 ----
  337.    *
  338.    *    Created by:    John T. Kohl
  339.    *
  340. !  *    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/lib/RCS/acl_files.c,v $
  341.    *    $Author: jtkohl $
  342.    *
  343.    *    Copyright (c) 1987,1988 by the Massachusetts Institute of Technology.
  344. ***************
  345. *** 14,20 ****
  346.   #include <zephyr/mit-copyright.h>
  347.   
  348.   #ifndef lint
  349. ! static char rcsid_acl_files_c[] = "$Header: acl_files.c,v 1.2 89/03/23 09:32:41 jtkohl Exp $";
  350.   #endif lint
  351.   
  352.   /*** Routines for manipulating access control list files ***/
  353. --- 14,20 ----
  354.   #include <zephyr/mit-copyright.h>
  355.   
  356.   #ifndef lint
  357. ! static char rcsid_acl_files_c[] = "$Id: acl_files.c,v 1.3 89/12/13 11:17:56 jtkohl Exp $";
  358.   #endif lint
  359.   
  360.   /*** Routines for manipulating access control list files ***/
  361. ***************
  362. *** 389,395 ****
  363.       i = acl_cache_next;
  364.       acl_cache_next = (acl_cache_next + 1) % CACHED_ACLS;
  365.       close(acl_cache[i].fd);
  366. !     if(acl_cache[i].acl) destroy_hash(acl_cache[i].acl);
  367.       }
  368.   
  369.       /* Set up the acl */
  370. --- 389,398 ----
  371.       i = acl_cache_next;
  372.       acl_cache_next = (acl_cache_next + 1) % CACHED_ACLS;
  373.       close(acl_cache[i].fd);
  374. !     if(acl_cache[i].acl) {
  375. !         destroy_hash(acl_cache[i].acl);
  376. !         acl_cache[i].acl = (struct hashtbl *) 0;
  377. !     }
  378.       }
  379.   
  380.       /* Set up the acl */
  381. ***************
  382. *** 399,406 ****
  383.       acl_cache[i].acl = (struct hashtbl *) 0;
  384.   
  385.    got_it:
  386. !     /* See if the stat matches */
  387. !     if(fstat(acl_cache[i].fd, &s) < 0) return(-1);
  388.       if(acl_cache[i].acl == (struct hashtbl *) 0
  389.          || s.st_nlink != acl_cache[i].status.st_nlink
  390.          || s.st_mtime != acl_cache[i].status.st_mtime
  391. --- 402,415 ----
  392.       acl_cache[i].acl = (struct hashtbl *) 0;
  393.   
  394.    got_it:
  395. !     /*
  396. !      * See if the stat matches
  397. !      *
  398. !      * Use stat(), not fstat(), as the file may have been re-created by
  399. !      * acl_add or acl_delete.  If this happens, the old inode will have
  400. !      * no changes in the mod-time and the following test will fail.
  401. !      */
  402. !     if(stat(acl_cache[i].filename, &s) < 0) return(-1);
  403.       if(acl_cache[i].acl == (struct hashtbl *) 0
  404.          || s.st_nlink != acl_cache[i].status.st_nlink
  405.          || s.st_mtime != acl_cache[i].status.st_mtime
  406. ***************
  407. *** 416,421 ****
  408. --- 425,431 ----
  409.              acl_canonicalize_principal(buf, canon);
  410.              add_hash(acl_cache[i].acl, canon);
  411.          }
  412. +        fclose(f);
  413.          acl_cache[i].status = s;
  414.          }
  415.       return(i);
  416. diff -rc patchlevel2/man/man1/znol.1 src/man/man1/znol.1
  417. *** patchlevel2/man/man1/znol.1    Fri Oct 27 13:29:35 1989
  418. --- src/man/man1/znol.1    Mon Oct 30 09:47:04 1989
  419. ***************
  420. *** 1,6 ****
  421.   .\"    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/man/man1/RCS/znol.1,v $
  422.   .\"    $Author: jtkohl $
  423. ! .\"    $Header: /afs/athena.mit.edu/astaff/project/zephyr/src/man/man1/RCS/znol.1,v 1.6 89/10/25 14:23:06 jtkohl Exp $
  424.   .\"
  425.   .\" Copyright 1987,1988 by the Massachusetts Institute of Technology
  426.   .\" All rights reserved.  The file /usr/include/zephyr/mit-copyright.h
  427. --- 1,6 ----
  428.   .\"    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/man/man1/RCS/znol.1,v $
  429.   .\"    $Author: jtkohl $
  430. ! .\"    $Header: /afs/athena.mit.edu/astaff/project/zephyr/src/man/man1/RCS/znol.1,v 1.7 89/10/30 09:46:58 jtkohl Exp $
  431.   .\"
  432.   .\" Copyright 1987,1988 by the Massachusetts Institute of Technology
  433.   .\" All rights reserved.  The file /usr/include/zephyr/mit-copyright.h
  434. ***************
  435. *** 46,51 ****
  436. --- 46,53 ----
  437.   The namelist file is taken to be
  438.   .I file.
  439.   If
  440. + .I file
  441. + is "-", then the standard input is used instead of a file. If
  442.   .I file
  443.   does not exist, an error message is printed, and
  444.   .I znol
  445. diff -rc patchlevel2/man/man8/Imakefile src/man/man8/Imakefile
  446. *** patchlevel2/man/man8/Imakefile    Thu Mar 23 11:54:40 1989
  447. --- src/man/man8/Imakefile    Fri Dec 15 09:08:30 1989
  448. ***************
  449. *** 3,15 ****
  450.   /**/#    For copying and distribution information, see the file
  451.   /**/#    "mit-copyright.h". 
  452.   /**/#
  453. ! /**/#    $Source: /mit/zephyr/src/man/man8/RCS/Imakefile,v $
  454.   /**/#    $Author: jtkohl $
  455. ! /**/#    $Header: Imakefile,v 1.2 89/03/23 11:54:34 jtkohl Exp $
  456.   /**/#
  457.   #define no_curdir_lint
  458.   
  459. ! MAN8 = zhm.8 zephyrd.8 zstat.8 zinit.8 zpopnotify.8 zshutdown_notify.8
  460.   
  461.   SRCDIR= ${SRCTOP}/man/man8
  462.   CODE= ${MAN8} Imakefile
  463. --- 3,15 ----
  464.   /**/#    For copying and distribution information, see the file
  465.   /**/#    "mit-copyright.h". 
  466.   /**/#
  467. ! /**/#    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/man/man8/RCS/Imakefile,v $
  468.   /**/#    $Author: jtkohl $
  469. ! /**/#    $Header: /afs/athena.mit.edu/astaff/project/zephyr/src/man/man8/RCS/Imakefile,v 1.4 89/12/15 09:08:28 jtkohl Exp $
  470.   /**/#
  471.   #define no_curdir_lint
  472.   
  473. ! MAN8 = zhm.8 zephyrd.8 zstat.8 zpopnotify.8 zshutdown_notify.8
  474.   
  475.   SRCDIR= ${SRCTOP}/man/man8
  476.   CODE= ${MAN8} Imakefile
  477. ***************
  478. *** 17,22 ****
  479.   manpage(8,zhm.8)
  480.   manpage(8,zephyrd.8)
  481.   manpage(8,zstat.8)
  482. - manpage(8,zinit.8)
  483.   manpage(8,zpopnotify.8)
  484.   manpage(8,zshutdown_notify.8)
  485. --- 17,21 ----
  486. diff -rc patchlevel2/server/Imakefile src/server/Imakefile
  487. *** patchlevel2/server/Imakefile    Fri Oct 27 13:29:36 1989
  488. --- src/server/Imakefile    Mon Dec 18 13:25:11 1989
  489. ***************
  490. *** 5,11 ****
  491.   /**/#
  492.   /**/#    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/Imakefile,v $
  493.   /**/#    $Author: jtkohl $
  494. ! /**/#    $Header: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/Imakefile,v 1.8 89/10/18 13:10:47 jtkohl Exp $
  495.   /**/#
  496.   
  497.   #if defined(DO_SYSLOG) && defined(SYSLOG_COMPAT42)
  498. --- 5,11 ----
  499.   /**/#
  500.   /**/#    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/Imakefile,v $
  501.   /**/#    $Author: jtkohl $
  502. ! /**/#    $Header: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/Imakefile,v 1.9 89/12/18 13:25:04 jtkohl Exp $
  503.   /**/#
  504.   
  505.   #if defined(DO_SYSLOG) && defined(SYSLOG_COMPAT42)
  506. ***************
  507. *** 71,77 ****
  508.   
  509.   install::
  510.       -mkdir ${DESTDIR}${ACLDIR}
  511. !     -rm -f ${DESTDIR}${ACLDIR}/?*
  512.       cp acldir/?* ${DESTDIR}${ACLDIR}
  513.       ${INSTALLFILE} default.subscriptions ${DESTDIR}${ACLDIR}/default.subscriptions
  514.   
  515. --- 71,77 ----
  516.   
  517.   install::
  518.       -mkdir ${DESTDIR}${ACLDIR}
  519. !     -rm -f ${DESTDIR}${ACLDIR}/?*.acl
  520.       cp acldir/?* ${DESTDIR}${ACLDIR}
  521.       ${INSTALLFILE} default.subscriptions ${DESTDIR}${ACLDIR}/default.subscriptions
  522.   
  523. diff -rc patchlevel2/server/class.c src/server/class.c
  524. *** patchlevel2/server/class.c    Wed Oct 19 22:49:38 1988
  525. --- src/server/class.c    Thu Dec 14 08:42:18 1989
  526. ***************
  527. *** 3,10 ****
  528.    *
  529.    *    Created by:    John T. Kohl
  530.    *
  531. !  *    $Source: /paris/source/4.3/athena.lib/zephyr/server/RCS/class.c,v $
  532. !  *    $Author: raeburn $
  533.    *
  534.    *    Copyright (c) 1987 by the Massachusetts Institute of Technology.
  535.    *    For copying and distribution information, see the file
  536. --- 3,10 ----
  537.    *
  538.    *    Created by:    John T. Kohl
  539.    *
  540. !  *    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/class.c,v $
  541. !  *    $Author: jtkohl $
  542.    *
  543.    *    Copyright (c) 1987 by the Massachusetts Institute of Technology.
  544.    *    For copying and distribution information, see the file
  545. ***************
  546. *** 15,26 ****
  547.   
  548.   #ifndef lint
  549.   #ifndef SABER
  550. ! static char rcsid_class_c[] = "$Header: class.c,v 1.11 88/10/19 22:49:18 raeburn Exp $";
  551.   #endif SABER
  552.   #endif lint
  553.   
  554.   #include "zserver.h"            /* includes zephyr/zephyr.h */
  555.   
  556.   /*
  557.    * Class manager subsystem.
  558.    *
  559. --- 15,28 ----
  560.   
  561.   #ifndef lint
  562.   #ifndef SABER
  563. ! static char rcsid_class_c[] = "$Id: class.c,v 1.13 89/12/14 08:42:10 jtkohl Exp $";
  564.   #endif SABER
  565.   #endif lint
  566.   
  567.   #include "zserver.h"            /* includes zephyr/zephyr.h */
  568.   
  569. + #include <ctype.h>            /* for isupper, tolower */
  570.   /*
  571.    * Class manager subsystem.
  572.    *
  573. ***************
  574. *** 128,134 ****
  575.       } else {
  576.           for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw)
  577.               /* walk down the list, looking for a match */
  578. !             if (!strcmp(ptr2->zct_classname, class_buf))
  579.                   return(insert_client(ptr2, client));
  580.   
  581.           /* fell off the end, no match */
  582. --- 130,136 ----
  583.       } else {
  584.           for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw)
  585.               /* walk down the list, looking for a match */
  586. !             if (!strcasecmp(ptr2->zct_classname, class_buf))
  587.                   return(insert_client(ptr2, client));
  588.   
  589.           /* fell off the end, no match */
  590. ***************
  591. *** 157,163 ****
  592.       
  593.       for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw) {
  594.           /* walk down the list, looking for a match */
  595. !         if (!strcmp(ptr2->zct_classname, class_buf)) {
  596.               if ((retval = remove_client(ptr2, client)) == EMPTY_CLASS) {
  597.                   zdbug((LOG_DEBUG,"empty class"));
  598.                   /* Don't free up restricted classes. */
  599. --- 159,165 ----
  600.       
  601.       for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw) {
  602.           /* walk down the list, looking for a match */
  603. !         if (!strcasecmp(ptr2->zct_classname, class_buf)) {
  604.               if ((retval = remove_client(ptr2, client)) == EMPTY_CLASS) {
  605.                   zdbug((LOG_DEBUG,"empty class"));
  606.                   /* Don't free up restricted classes. */
  607. ***************
  608. *** 199,205 ****
  609.           /* go search the list for the class */
  610.           for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw) {
  611.               /* walk down the list, looking for a match */
  612. !             if (!strcmp(ptr2->zct_classname, class_buf)) {
  613.                   list = ptr2->zct_clientlist;
  614.                   break;
  615.               }
  616. --- 201,207 ----
  617.           /* go search the list for the class */
  618.           for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw) {
  619.               /* walk down the list, looking for a match */
  620. !             if (!strcasecmp(ptr2->zct_classname, class_buf)) {
  621.                   list = ptr2->zct_clientlist;
  622.                   break;
  623.               }
  624. ***************
  625. *** 212,218 ****
  626.           /* go search the list for the class */
  627.           for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw) {
  628.               /* walk down the list, looking for a match */
  629. !             if (!strcmp(ptr2->zct_classname, class_buf)) {
  630.                   wc_list = ptr2->zct_clientlist;
  631.                   break;
  632.               }
  633. --- 214,220 ----
  634.           /* go search the list for the class */
  635.           for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw) {
  636.               /* walk down the list, looking for a match */
  637. !             if (!strcasecmp(ptr2->zct_classname, class_buf)) {
  638.                   wc_list = ptr2->zct_clientlist;
  639.                   break;
  640.               }
  641. ***************
  642. *** 274,280 ****
  643.   class_is_control(notice)
  644.   ZNotice_t *notice;
  645.   {
  646. !     return(!strcmp(notice->z_class, ZEPHYR_CTL_CLASS));
  647.   }
  648.   
  649.   int
  650. --- 276,282 ----
  651.   class_is_control(notice)
  652.   ZNotice_t *notice;
  653.   {
  654. !     return(!strcasecmp(notice->z_class, ZEPHYR_CTL_CLASS));
  655.   }
  656.   
  657.   int
  658. ***************
  659. *** 281,287 ****
  660.   class_is_admin(notice)
  661.   ZNotice_t *notice;
  662.   {
  663. !     return(!strcmp(notice->z_class, ZEPHYR_ADMIN_CLASS));
  664.   }
  665.   
  666.   int
  667. --- 283,289 ----
  668.   class_is_admin(notice)
  669.   ZNotice_t *notice;
  670.   {
  671. !     return(!strcasecmp(notice->z_class, ZEPHYR_ADMIN_CLASS));
  672.   }
  673.   
  674.   int
  675. ***************
  676. *** 288,294 ****
  677.   class_is_hm(notice)
  678.   ZNotice_t *notice;
  679.   {
  680. !     return(!strcmp(notice->z_class, HM_CTL_CLASS));
  681.   }
  682.   
  683.   int
  684. --- 290,296 ----
  685.   class_is_hm(notice)
  686.   ZNotice_t *notice;
  687.   {
  688. !     return(!strcasecmp(notice->z_class, HM_CTL_CLASS));
  689.   }
  690.   
  691.   int
  692. ***************
  693. *** 295,301 ****
  694.   class_is_ulogin(notice)
  695.   ZNotice_t *notice;
  696.   {
  697. !     return(!strcmp(notice->z_class, LOGIN_CLASS));
  698.   }
  699.   
  700.   int
  701. --- 297,303 ----
  702.   class_is_ulogin(notice)
  703.   ZNotice_t *notice;
  704.   {
  705. !     return(!strcasecmp(notice->z_class, LOGIN_CLASS));
  706.   }
  707.   
  708.   int
  709. ***************
  710. *** 302,308 ****
  711.   class_is_ulocate(notice)
  712.   ZNotice_t *notice;
  713.   {
  714. !     return(!strcmp(notice->z_class, LOCATE_CLASS));
  715.   }
  716.   
  717.   /*
  718. --- 304,310 ----
  719.   class_is_ulocate(notice)
  720.   ZNotice_t *notice;
  721.   {
  722. !     return(!strcasecmp(notice->z_class, LOCATE_CLASS));
  723.   }
  724.   
  725.   /*
  726. ***************
  727. *** 322,328 ****
  728.   
  729.       /* walk down the list, looking for a match */
  730.       for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw)
  731. !         if (!strcmp(ptr2->zct_classname, class))
  732.               return(ptr2->zct_acl);
  733.   
  734.       /* fell off the end, no match ==> not restricted */
  735. --- 324,330 ----
  736.   
  737.       /* walk down the list, looking for a match */
  738.       for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw)
  739. !         if (!strcasecmp(ptr2->zct_classname, class))
  740.               return(ptr2->zct_acl);
  741.   
  742.       /* fell off the end, no match ==> not restricted */
  743. ***************
  744. *** 349,355 ****
  745.           return(ZSRV_NOCLASS);
  746.       for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw)
  747.           /* walk down the list, looking for a match */
  748. !         if (!strcmp(ptr2->zct_classname, class)) {
  749.               if (ptr2->zct_acl)
  750.                   return(ZSRV_CLASSRESTRICTED);
  751.               ptr2->zct_acl = acl;
  752. --- 351,357 ----
  753.           return(ZSRV_NOCLASS);
  754.       for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw)
  755.           /* walk down the list, looking for a match */
  756. !         if (!strcasecmp(ptr2->zct_classname, class)) {
  757.               if (ptr2->zct_acl)
  758.                   return(ZSRV_CLASSRESTRICTED);
  759.               ptr2->zct_acl = acl;
  760. ***************
  761. *** 397,403 ****
  762.       } else {
  763.           for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw)
  764.           /* walk down the list, looking for a match */
  765. !         if (!strcmp(ptr2->zct_classname, class))
  766.               return(ZSRV_CLASSXISTS);
  767.           if (!(ptr2 = class_alloc(class)))
  768.           return(ENOMEM);
  769. --- 399,405 ----
  770.       } else {
  771.           for (ptr2 = ptr->q_forw; ptr2 != ptr; ptr2 = ptr2->q_forw)
  772.           /* walk down the list, looking for a match */
  773. !         if (!strcasecmp(ptr2->zct_classname, class))
  774.               return(ZSRV_CLASSXISTS);
  775.           if (!(ptr2 = class_alloc(class)))
  776.           return(ENOMEM);
  777. ***************
  778. *** 418,425 ****
  779.       register unsigned int hval = 0;
  780.       register unsigned char *cp = (unsigned char *) string;
  781.   
  782. !     while (*cp)
  783.           hval = (hval + (*cp++) * HASHMUL) % HASHSIZE;
  784.       return(hval);
  785.   }
  786.   
  787. --- 420,432 ----
  788.       register unsigned int hval = 0;
  789.       register unsigned char *cp = (unsigned char *) string;
  790.   
  791. !     while (*cp) {
  792. !         if (isupper(*cp)) {
  793. !         hval = (hval + (tolower(*cp)) * HASHMUL) % HASHSIZE;
  794. !         cp++;
  795. !         } else
  796.           hval = (hval + (*cp++) * HASHMUL) % HASHSIZE;
  797. +     }
  798.       return(hval);
  799.   }
  800.   
  801. diff -rc patchlevel2/server/dispatch.c src/server/dispatch.c
  802. *** patchlevel2/server/dispatch.c    Thu May  4 17:36:51 1989
  803. --- src/server/dispatch.c    Wed Dec 13 10:31:59 1989
  804. ***************
  805. *** 3,9 ****
  806.    *
  807.    *    Created by:    John T. Kohl
  808.    *
  809. !  *    $Source: /mit/zephyr/src/server/RCS/dispatch.c,v $
  810.    *    $Author: jtkohl $
  811.    *
  812.    *    Copyright (c) 1987 by the Massachusetts Institute of Technology.
  813. --- 3,9 ----
  814.    *
  815.    *    Created by:    John T. Kohl
  816.    *
  817. !  *    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/dispatch.c,v $
  818.    *    $Author: jtkohl $
  819.    *
  820.    *    Copyright (c) 1987 by the Massachusetts Institute of Technology.
  821. ***************
  822. *** 15,21 ****
  823.   
  824.   #ifndef lint
  825.   #ifndef SABER
  826. ! static char rcsid_dispatch_c[] = "$Header: dispatch.c,v 1.29 89/05/04 17:36:32 jtkohl Exp $";
  827.   #endif SABER
  828.   #endif lint
  829.   
  830. --- 15,21 ----
  831.   
  832.   #ifndef lint
  833.   #ifndef SABER
  834. ! static char rcsid_dispatch_c[] = "$Id: dispatch.c,v 1.32 89/12/13 10:31:44 jtkohl Exp $";
  835.   #endif SABER
  836.   #endif lint
  837.   
  838. ***************
  839. *** 171,177 ****
  840.           break;
  841.       }
  842.       if (whoisit.sin_port != hm_port &&
  843. !         strcmp(new_notice.z_class,ZEPHYR_ADMIN_CLASS) &&
  844.           whoisit.sin_port != sock_sin.sin_port &&
  845.           new_notice.z_kind != CLIENTACK) {
  846.           syslog(LOG_ERR,
  847. --- 171,177 ----
  848.           break;
  849.       }
  850.       if (whoisit.sin_port != hm_port &&
  851. !         strcasecmp(new_notice.z_class,ZEPHYR_ADMIN_CLASS) &&
  852.           whoisit.sin_port != sock_sin.sin_port &&
  853.           new_notice.z_kind != CLIENTACK) {
  854.           syslog(LOG_ERR,
  855. ***************
  856. *** 302,307 ****
  857. --- 302,317 ----
  858.           return;
  859.           }
  860.       }
  861. +     if (bcmp(¬ice->z_sender_addr.s_addr, &who->sin_addr.s_addr,
  862. +          sizeof(notice->z_sender_addr.s_addr))) {
  863. +         /* someone is playing games... */
  864. +         /* inet_ntoa returns pointer to static area */
  865. +         /* max size is 255.255.255.255 */
  866. +         char buffer[16];
  867. +         (void) strcpy(buffer, inet_ntoa(who->sin_addr));
  868. +         syslog(LOG_WARNING, "sendit addr mismatch: claimed %s, real %s",
  869. +            inet_ntoa(notice->z_sender_addr), buffer);
  870. +     }
  871.       if ((clientlist = subscr_match_list(notice))) {
  872.           for (ptr = clientlist->q_forw;
  873.                ptr != clientlist;
  874. ***************
  875. *** 487,493 ****
  876.           return;
  877.       }
  878.       if ((retval = ZSendPacket(noticepack, packlen, 0)) != ZERR_NONE) {
  879. !         syslog(LOG_WARNING, "xmit xmit: %s", error_message(retval));
  880.           xfree(noticepack);
  881.           return;
  882.       }
  883. --- 497,505 ----
  884.           return;
  885.       }
  886.       if ((retval = ZSendPacket(noticepack, packlen, 0)) != ZERR_NONE) {
  887. !         syslog(LOG_WARNING, "xmit xmit: (%s/%d) %s",
  888. !                inet_ntoa(dest->sin_addr), ntohs(dest->sin_port),
  889. !                error_message(retval));
  890.           xfree(noticepack);
  891.           return;
  892.       }
  893. ***************
  894. *** 719,725 ****
  895.        *    CLIENT_CANCELSUB:   ""
  896.        */
  897.   
  898. !     if (!strcmp(notice->z_class_inst, ZEPHYR_CTL_HM))
  899.           return(hostm_dispatch(notice, auth, who, server));
  900.       else if (!strcmp(opcode, CLIENT_GIMMESUBS) ||
  901.            !strcmp(opcode, CLIENT_GIMMEDEFS)) {
  902. --- 731,737 ----
  903.        *    CLIENT_CANCELSUB:   ""
  904.        */
  905.   
  906. !     if (!strcasecmp(notice->z_class_inst, ZEPHYR_CTL_HM))
  907.           return(hostm_dispatch(notice, auth, who, server));
  908.       else if (!strcmp(opcode, CLIENT_GIMMESUBS) ||
  909.            !strcmp(opcode, CLIENT_GIMMEDEFS)) {
  910. diff -rc patchlevel2/server/server.c src/server/server.c
  911. *** patchlevel2/server/server.c    Fri Oct 27 13:29:38 1989
  912. --- src/server/server.c    Thu Dec 14 08:36:39 1989
  913. ***************
  914. *** 15,21 ****
  915.   
  916.   #ifndef lint
  917.   #ifndef SABER
  918. ! static char rcsid_server_c[] = "$Id: server.c,v 1.41 89/10/27 11:33:34 jtkohl Exp $";
  919.   #endif SABER
  920.   #endif lint
  921.   
  922. --- 15,21 ----
  923.   
  924.   #ifndef lint
  925.   #ifndef SABER
  926. ! static char rcsid_server_c[] = "$Id: server.c,v 1.43 89/12/14 08:36:27 jtkohl Exp $";
  927.   #endif SABER
  928.   #endif lint
  929.   
  930. ***************
  931. *** 710,726 ****
  932.       if ((status = extract_addr(notice, &who)) != ZERR_NONE)
  933.           return(status);
  934.       if (!(host = hostm_find_host(&who.sin_addr))) {
  935. !         syslog(LOG_WARNING, "recover_clt h not found, from %s",
  936. !                inet_ntoa(server->zs_addr.sin_addr));
  937. !         syslog(LOG_WARNING, "%s", inet_ntoa(who.sin_addr));
  938.           return(ZERR_NONE);    /* XXX */
  939.       }
  940.       if (host->zh_locked)
  941.           return(ZSRV_REQUEUE);
  942.       if (!(client = client_which_client(&who, notice))) {
  943. !         syslog(LOG_WARNING, "recover_clt not found, from %s",
  944. !                inet_ntoa(server->zs_addr.sin_addr));
  945. !         syslog(LOG_WARNING, "%s/%d",inet_ntoa(who.sin_addr),
  946.                  ntohs(who.sin_port));
  947.           return(ZERR_NONE);    /* XXX */
  948.       }
  949. --- 710,728 ----
  950.       if ((status = extract_addr(notice, &who)) != ZERR_NONE)
  951.           return(status);
  952.       if (!(host = hostm_find_host(&who.sin_addr))) {
  953. !         char buf[16];        /* long enough for 255.255.255.255\0 */
  954. !         (void) strncpy(buf, inet_ntoa(who.sin_addr), sizeof(buf));
  955. !         syslog(LOG_WARNING, "recover_clt h not found, from %s for %s",
  956. !                inet_ntoa(server->zs_addr.sin_addr), buf);
  957.           return(ZERR_NONE);    /* XXX */
  958.       }
  959.       if (host->zh_locked)
  960.           return(ZSRV_REQUEUE);
  961.       if (!(client = client_which_client(&who, notice))) {
  962. !         char buf[16];        /* long enough for 255.255.255.255\0 */
  963. !         (void) strncpy(buf, inet_ntoa(who.sin_addr), sizeof(buf));
  964. !         syslog(LOG_WARNING, "recover_clt not found, from %s for %s/%d",
  965. !                inet_ntoa(server->zs_addr.sin_addr), buf,
  966.                  ntohs(who.sin_port));
  967.           return(ZERR_NONE);    /* XXX */
  968.       }
  969. ***************
  970. *** 1122,1133 ****
  971.   register char **list;
  972.   {
  973.       register int i;
  974.   
  975.       if (!nhosts)            /* nothing allocated */
  976.           return;
  977.       for (; *list; list++)
  978.           xfree(*list);
  979. !     xfree(list);
  980.       return;
  981.   }
  982.   #endif !HESIOD
  983. --- 1124,1136 ----
  984.   register char **list;
  985.   {
  986.       register int i;
  987. +     char **orig_list = list;
  988.   
  989.       if (!nhosts)            /* nothing allocated */
  990.           return;
  991.       for (; *list; list++)
  992.           xfree(*list);
  993. !     xfree(orig_list);
  994.       return;
  995.   }
  996.   #endif !HESIOD
  997. diff -rc patchlevel2/server/subscr.c src/server/subscr.c
  998. *** patchlevel2/server/subscr.c    Fri Oct 27 13:29:39 1989
  999. --- src/server/subscr.c    Wed Dec 13 10:32:27 1989
  1000. ***************
  1001. *** 15,21 ****
  1002.   
  1003.   #ifndef lint
  1004.   #ifndef SABER
  1005. ! static char rcsid_subscr_c[] = "$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/subscr.c,v 1.36 89/10/26 14:18:28 jtkohl Exp $";
  1006.   #endif SABER
  1007.   #endif lint
  1008.   
  1009. --- 15,21 ----
  1010.   
  1011.   #ifndef lint
  1012.   #ifndef SABER
  1013. ! static char rcsid_subscr_c[] = "$Id: subscr.c,v 1.37 89/12/13 10:32:14 jtkohl Exp $";
  1014.   #endif SABER
  1015.   #endif lint
  1016.   
  1017. ***************
  1018. *** 173,179 ****
  1019.                subs2 != who->zct_subs;
  1020.                subs2 = subs2->q_forw) {
  1021.               /* for each existing subscription */
  1022. !             relation = strcmp(subs->zst_class, subs2->zst_class);
  1023.               if (relation > 0) /* we have passed the last
  1024.                            possible one */
  1025.                   break;
  1026. --- 173,179 ----
  1027.                subs2 != who->zct_subs;
  1028.                subs2 = subs2->q_forw) {
  1029.               /* for each existing subscription */
  1030. !             relation = strcasecmp(subs->zst_class, subs2->zst_class);
  1031.               if (relation > 0) /* we have passed the last
  1032.                            possible one */
  1033.                   break;
  1034. ***************
  1035. *** 372,378 ****
  1036.                subs2 != who->zct_subs;) {
  1037.               /* for each existing subscription */
  1038.               /* is this what we are canceling? */
  1039. !             relation = strcmp(subs4->zst_class, subs2->zst_class);
  1040.               if (relation > 0) /* we have passed the last
  1041.                            possible one */
  1042.                   break;
  1043. --- 372,378 ----
  1044.                subs2 != who->zct_subs;) {
  1045.               /* for each existing subscription */
  1046.               /* is this what we are canceling? */
  1047. !             relation = strcasecmp(subs4->zst_class, subs2->zst_class);
  1048.               if (relation > 0) /* we have passed the last
  1049.                            possible one */
  1050.                   break;
  1051. ***************
  1052. *** 1086,1098 ****
  1053.            subs != client->zct_subs;
  1054.            subs = subs->q_forw) {
  1055.           /* for each subscription, do matching */
  1056. !         relation = strcmp(notice->z_class, subs->zst_class);
  1057.           if (relation > 0)    /* past the last possible one */
  1058.               return(0);
  1059.           if (relation < 0)
  1060.               continue;    /* no match */
  1061.           if (strcmp(subs->zst_classinst, WILDCARD_INSTANCE) &&
  1062. !             strcmp(subs->zst_classinst, notice->z_class_inst))
  1063.               continue;
  1064.           if (strcmp(notice->z_recipient, subs->zst_recipient))
  1065.               continue;
  1066. --- 1086,1098 ----
  1067.            subs != client->zct_subs;
  1068.            subs = subs->q_forw) {
  1069.           /* for each subscription, do matching */
  1070. !         relation = strcasecmp(notice->z_class, subs->zst_class);
  1071.           if (relation > 0)    /* past the last possible one */
  1072.               return(0);
  1073.           if (relation < 0)
  1074.               continue;    /* no match */
  1075.           if (strcmp(subs->zst_classinst, WILDCARD_INSTANCE) &&
  1076. !             strcasecmp(subs->zst_classinst, notice->z_class_inst))
  1077.               continue;
  1078.           if (strcmp(notice->z_recipient, subs->zst_recipient))
  1079.               continue;
  1080. ***************
  1081. *** 1143,1149 ****
  1082.   subscr_equiv(s1, s2)
  1083.   register ZSubscr_t *s1, *s2;
  1084.   {
  1085. !     if (strcmp(s1->zst_classinst,s2->zst_classinst))
  1086.           return(0);
  1087.       if (strcmp(s1->zst_recipient,s2->zst_recipient))
  1088.           return(0);
  1089. --- 1143,1149 ----
  1090.   subscr_equiv(s1, s2)
  1091.   register ZSubscr_t *s1, *s2;
  1092.   {
  1093. !     if (strcasecmp(s1->zst_classinst,s2->zst_classinst))
  1094.           return(0);
  1095.       if (strcmp(s1->zst_recipient,s2->zst_recipient))
  1096.           return(0);
  1097. diff -rc patchlevel2/server/uloc.c src/server/uloc.c
  1098. *** patchlevel2/server/uloc.c    Fri Oct 27 13:29:40 1989
  1099. --- src/server/uloc.c    Wed Dec 13 10:29:58 1989
  1100. ***************
  1101. *** 14,20 ****
  1102.   #include <zephyr/mit-copyright.h>
  1103.   
  1104.   #ifndef lint
  1105. ! static char rcsid_uloc_c[] = "$Header: /afs/athena.mit.edu/astaff/project/zephyr/src/server/RCS/uloc.c,v 1.33 89/10/26 14:19:13 jtkohl Exp $";
  1106.   #endif lint
  1107.   
  1108.   #include "zserver.h"
  1109. --- 14,20 ----
  1110.   #include <zephyr/mit-copyright.h>
  1111.   
  1112.   #ifndef lint
  1113. ! static char rcsid_uloc_c[] = "$Id: uloc.c,v 1.34 89/12/13 10:29:46 jtkohl Exp $";
  1114.   #endif lint
  1115.   
  1116.   #include "zserver.h"
  1117. ***************
  1118. *** 895,901 ****
  1119.   ul_equiv(l1, l2)
  1120.   register ZLocation_t *l1, *l2;
  1121.   {
  1122. !     if (strcmp(l1->zlt_machine, l2->zlt_machine))
  1123.           return(0);
  1124.       if (strcmp(l1->zlt_tty, l2->zlt_tty))
  1125.           return(0);
  1126. --- 895,901 ----
  1127.   ul_equiv(l1, l2)
  1128.   register ZLocation_t *l1, *l2;
  1129.   {
  1130. !     if (strcasecmp(l1->zlt_machine, l2->zlt_machine))
  1131.           return(0);
  1132.       if (strcmp(l1->zlt_tty, l2->zlt_tty))
  1133.           return(0);
  1134. ***************
  1135. *** 1099,1105 ****
  1136.              !strcmp(locations[idx].zlt_user, loc2.zlt_user)) {
  1137.   
  1138.           /* change exposure and owner for each loc on that host */
  1139. !         if (!strcmp(locations[idx].zlt_machine, loc2.zlt_machine)) {
  1140.               notfound = 0;
  1141.               locations[idx].zlt_exposure = exposure;
  1142.               locations[idx].zlt_port = notice->z_port;
  1143. --- 1099,1105 ----
  1144.              !strcmp(locations[idx].zlt_user, loc2.zlt_user)) {
  1145.   
  1146.           /* change exposure and owner for each loc on that host */
  1147. !         if (!strcasecmp(locations[idx].zlt_machine, loc2.zlt_machine)) {
  1148.               notfound = 0;
  1149.               locations[idx].zlt_exposure = exposure;
  1150.               locations[idx].zlt_port = notice->z_port;
  1151. diff -rc patchlevel2/server/version.c src/server/version.c
  1152. *** patchlevel2/server/version.c    Fri Oct 27 13:29:41 1989
  1153. --- src/server/version.c    Wed Dec 13 10:33:22 1989
  1154. ***************
  1155. *** 14,26 ****
  1156.   #include <zephyr/mit-copyright.h>
  1157.   
  1158.   #ifdef DEBUG
  1159. ! char version[] = "Zephyr Server (DEBUG) $Revision: 3.15 $";
  1160.   #else
  1161. ! char version[] = "Zephyr Server $Revision: 3.15 $";
  1162.   #endif DEBUG
  1163.   #ifndef lint
  1164.   #ifndef SABER
  1165. ! static char rcsid_version_c[] = "$Id: version.c,v 3.15 89/10/26 14:20:07 jtkohl Exp $";
  1166.   char copyright[] = "Copyright (c) 1987,1988,1989 Massachusetts Institute of Technology.\n";
  1167.   #ifdef CONCURRENT
  1168.   char concurrent[] = "Brain-dump concurrency enabled";
  1169. --- 14,26 ----
  1170.   #include <zephyr/mit-copyright.h>
  1171.   
  1172.   #ifdef DEBUG
  1173. ! char version[] = "Zephyr Server (DEBUG) $Revision: 3.19 $";
  1174.   #else
  1175. ! char version[] = "Zephyr Server $Revision: 3.19 $";
  1176.   #endif DEBUG
  1177.   #ifndef lint
  1178.   #ifndef SABER
  1179. ! static char rcsid_version_c[] = "$Id: version.c,v 3.19 89/12/13 10:32:54 jtkohl Exp $";
  1180.   char copyright[] = "Copyright (c) 1987,1988,1989 Massachusetts Institute of Technology.\n";
  1181.   #ifdef CONCURRENT
  1182.   char concurrent[] = "Brain-dump concurrency enabled";
  1183. diff -rc patchlevel2/zhm/Imakefile src/zhm/Imakefile
  1184. *** patchlevel2/zhm/Imakefile    Thu May  4 21:14:33 1989
  1185. --- src/zhm/Imakefile    Mon Dec 18 13:20:04 1989
  1186. ***************
  1187. *** 3,11 ****
  1188.   /**/#    For copying and distribution information, see the file
  1189.   /**/#    "mit-copyright.h". 
  1190.   /**/#
  1191. ! /**/#    $Source: /mit/zephyr/src/zhm/RCS/Imakefile,v $
  1192.   /**/#    $Author: jtkohl $
  1193. ! /**/#    $Header: Imakefile,v 1.6 89/05/04 21:14:25 jtkohl Exp $
  1194.   /**/#
  1195.   
  1196.   #if defined(DO_SYSLOG) && defined(SYSLOG_COMPAT42)
  1197. --- 3,11 ----
  1198.   /**/#    For copying and distribution information, see the file
  1199.   /**/#    "mit-copyright.h". 
  1200.   /**/#
  1201. ! /**/#    $Source: /afs/athena.mit.edu/astaff/project/zephyr/src/zhm/RCS/Imakefile,v $
  1202.   /**/#    $Author: jtkohl $
  1203. ! /**/#    $Header: /afs/athena.mit.edu/astaff/project/zephyr/src/zhm/RCS/Imakefile,v 1.7 89/12/18 13:19:55 jtkohl Exp $
  1204.   /**/#
  1205.   
  1206.   #if defined(DO_SYSLOG) && defined(SYSLOG_COMPAT42)
  1207. ***************
  1208. *** 22,27 ****
  1209. --- 22,34 ----
  1210.   
  1211.   SRCDIR= ${SRCTOP}/zhm
  1212.   CODE= ${HDRS} ${SRCS} Imakefile
  1213. + /*
  1214. +  * The pathname for the pid file.
  1215. +  */
  1216. + ZHMPIDFILE=$(ETCATHDIR)/zhm.pid
  1217. + DEFINES=-DPIDFILE=\"$(ZHMPIDFILE)\"
  1218.   
  1219.   normal_obj_rule()
  1220.   
  1221. diff -rc patchlevel2/zhm/zhm.c src/zhm/zhm.c
  1222. *** patchlevel2/zhm/zhm.c    Fri Oct 27 13:29:41 1989
  1223. --- src/zhm/zhm.c    Mon Dec 18 13:20:20 1989
  1224. ***************
  1225. *** 13,19 ****
  1226.   
  1227.   #include "zhm.h"
  1228.   
  1229. ! static char rcsid_hm_c[] = "$Id: zhm.c,v 1.42 89/10/27 10:55:13 jtkohl Exp $";
  1230.   
  1231.   #include <ctype.h>
  1232.   #include <signal.h>
  1233. --- 13,19 ----
  1234.   
  1235.   #include "zhm.h"
  1236.   
  1237. ! static char rcsid_hm_c[] = "$Id: zhm.c,v 1.43 89/12/18 13:20:06 jtkohl Exp $";
  1238.   
  1239.   #include <ctype.h>
  1240.   #include <signal.h>
  1241. ***************
  1242. *** 29,34 ****
  1243. --- 29,38 ----
  1244.   #include <hesiod.h>
  1245.   #endif HESIOD
  1246.   
  1247. + #ifndef PIDFILE
  1248. + #define    PIDFILE    "/etc/athena/zhm.pid"
  1249. + #endif /* PIDFILE */
  1250.   int hmdebug = 0, rebootflag = 0, errflg = 0, dieflag = 0, inetd = 0, oldpid;
  1251.   int no_server = 1, nservchang = 0, nserv = 0, nclt = 0;
  1252.   int booting = 1, timeout_type = 0, deactivated = 1;
  1253. ***************
  1254. *** 42,48 ****
  1255.   struct hostent *hp;
  1256.   char **clust_info;
  1257.   char hostname[MAXHOSTNAMELEN], loopback[4];
  1258. ! char *PidFile = "/etc/athena/zhm.pid";
  1259.   
  1260.   extern int errno;
  1261.   extern char *index(), *strcpy(), *sbrk();
  1262. --- 46,52 ----
  1263.   struct hostent *hp;
  1264.   char **clust_info;
  1265.   char hostname[MAXHOSTNAMELEN], loopback[4];
  1266. ! char *PidFile = PIDFILE;
  1267.   
  1268.   extern int errno;
  1269.   extern char *index(), *strcpy(), *sbrk();
  1270.